<script type="text/javascript" src="/statics/plugins/codemirror/codemirror.js"></script>
<link href="/statics/plugins/codemirror/codemirror.css" rel="stylesheet" type="text/css" />
            <div class="form-group">
                <textarea class="form-control" id="<?php echo $id ?>" name="<?php echo $name; ?>"><?php if (!empty($contents)) {echo $contents;} ?></textarea>
                <p class="help-blockk"></p>
            </div>
    </div>
</div>

<script type="text/javascript">
var editor = CodeMirror.fromTextArea(document.getElementById("<?php echo $id ?>"), {
　　mode: "text/html",
　　styleActiveLine: true,
　　lineNumbers: true,
　　lineWrapping: true
});
</script>